﻿Imports System.Data.SqlClient
Imports System.Configuration
Module Md_KetNoi

    Public KetNoi As New SqlConnection

    Sub XdKetNoi()
        Try
            KetNoi.ConnectionString = "data source=.;Initial catalog=MUABANMAYTINH;Integrated Security=True"
            If KetNoi.State = ConnectionState.Open Then
                NgatKetNoi()
            End If
            KetNoi.Open()
5:

        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
    End Sub
    Sub NgatKetNoi()
        KetNoi.Close()
    End Sub

End Module
